Skip to content

chore: move examples to app-templates repo#99

Draft
thisistonydang wants to merge 1 commit into
mainfrom
thisistonydang/move-devhub-examples-to-app-templates
Draft

chore: move examples to app-templates repo#99
thisistonydang wants to merge 1 commit into
mainfrom
thisistonydang/move-devhub-examples-to-app-templates

Conversation

@thisistonydang
Copy link
Copy Markdown
Collaborator

@thisistonydang thisistonydang commented May 20, 2026

Summary

Companion to databricks/app-templates#217. Migrates the six full-stack showcase examples (agentic-support-console, content-moderator, inventory-intelligence, rag-chat, saas-tracker, vacation-rentals) out of devhub/examples/ and into databricks/app-templates as flat top-level entries.

What this PR changes inside DevHub:

  • Metadata schema — renames Example.githubPath to Example.templateUrl (full GitHub URL), decoupling the registry from the devhub repo layout. All six createExample() entries in src/lib/recipes/recipes.ts are updated accordingly.
  • URL buildersapi/content-markdown.ts, src/components/examples/example-detail.tsx, and src/lib/examples/build-example-markdown.ts now consume templateUrl directly. The hardcoded databricks/devhub + /template suffix logic is gone.
  • initCommand rewrites — five git clone --depth 1 https://github.com/databricks/app-templates.git\ncd app-templates/<slug> plus the rag-chat databricks apps init --template …/app-templates/tree/main/rag-chat ….
  • Example content — six content/examples/<slug>/goal.md files have their template/README.md references updated to README.md. The build-prompt narrative ("Clone and follow template/README.md") becomes "Clone and follow README.md".
  • Authoring docsCONTRIBUTING.md, .agents/skills/author-recipes-and-cookbooks/SKILL.md, and its references/quality-checklist.md rewritten to describe the new flat layout in app-templates (no template/ subdir, full URL in templateUrl).
  • Deletes — the six examples/<slug>/template/ trees, plus the obsolete .gitattributes linguist rule for examples/*/template/package-lock.json (the file is now empty so the file itself is removed).
  • examples/README.md — rewritten as a small stub pointing at app-templates and noting that vacation-rentals/blog-post-snippets/ is the only remaining child (kept here because it's blog supporting material referenced by jamesbroadhead/appkit-blog-snippets, not a runnable template).
  • Teststests/build-example-markdown.test.ts, tests/e2e/copy-markdown.spec.ts, and tests/markdown.test.ts fixtures and assertions updated to reflect the new URLs and copy.

DevHub URL slugs (Example.id / /templates/<slug>) are unchanged. External blog post and docs links continue to resolve.

Dependency / merge order

The new templateUrl/initCommand strings point at paths in databricks/app-templates. Merge databricks/app-templates#217 first. Merging this PR before that one would temporarily leave the DevHub site with broken "View source on GitHub" links and broken databricks apps init --template … commands until app-templates lands.

Test plan

  • npm run typecheck — pass
  • npm run test — 269 / 269 unit + 107 / 107 e2e pass
  • npm run validate:content — pass
  • npm run verify:images — pass (64 raster images)
  • npm run build — pass
  • npm run fmt — applied
  • Reviewer to spot-check that a deployed DevHub site shows correct "View source on GitHub" links once app-templates#217 is merged.

Co-authored-by: Cursor

The six full-stack showcase examples (agentic-support-console,
content-moderator, inventory-intelligence, rag-chat, saas-tracker,
and vacation-rentals) now live in the databricks/app-templates repo
as flat top-level entries. This commit:

- Deletes the moved template/ trees from devhub/examples/. Keeps
  vacation-rentals/blog-post-snippets/ as the only remaining content
  (referenced by the AppKit blog post).
- Renames Example.githubPath -> Example.templateUrl (full GitHub URL),
  so the metadata is no longer coupled to the devhub repo layout.
- Updates the three URL builders (api/content-markdown.ts,
  src/components/examples/example-detail.tsx,
  src/lib/examples/build-example-markdown.ts) to consume templateUrl
  directly.
- Rewrites initCommand strings (5 git-clone + rag-chat init) and the
  six content/examples/<slug>/goal.md README references to drop the
  template/ subdir.
- Updates CONTRIBUTING.md, the author-recipes-and-cookbooks skill, and
  the quality-checklist to describe the new app-templates layout.
- Drops the obsolete examples/*/template/package-lock.json linguist
  rule from .gitattributes.
- Rewrites examples/README.md as a stub pointing readers at
  app-templates and noting that blog-post-snippets remains.

Depends on databricks/app-templates landing first so the new
templateUrl/initCommand strings resolve.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant